<template>
  <view class="coupon">
    <!-- 券列表 -->
    <couponListMm v-if="proMmFlag" ref="couponList" />
    <couponListXgl v-else-if="proXglFlag" ref="couponList" />
  </view>
</template>

<script>
import website from '@/const/website'
import couponListMm from '@/components/couponList/couponListMm'
import couponListXgl from '@/components/couponList/couponListXgl'
export default {
  components: {
    couponListMm,
    couponListXgl
  },
  data() {
    return {
      proMmFlag: false,
      proXglFlag: false
    }
  },
  onLoad() {
    this.proMmFlag = website.projectType === 'mm'
    this.proXglFlag = website.projectType === 'xgl'
  },
  onShow() {
    this.$nextTick(() => {
      this.$refs.couponList.refresh()
    })
  },
  onReachBottom() {
    this.$nextTick(() => {
      this.$refs.couponList.pageing()
    })
  },
  methods: {}
}
</script>

<style  scoped>
</style>
